#pragma once

#include "components.h"
#include "event.h"
#include "models.h"
#include "util.hpp"

#include "qbe/src/ecs/ecs.hpp"

#include "../../layout/layout.hpp"
#include "../../select/select_cmd.hpp"
#include "../../state/state.hpp"
#include "../../undoRedo/undoRedo.hpp"
#include "../../utils/kutils.h"
#include "qlib/all.h"

namespace qbe::editing::Extension {

void updateVisualRender(ecs::EventWriter<Extension::Event> event_writer);
void clearVisualRender(ecs::EventWriter<Extension::Event> event_writer);

void exit(ecs::Query query);

void init(entt::registry& reg, ecs::Commands commands, ecs::Query query);

//延伸
void update(entt::registry& ecs_reg, ecs::Query query, ecs::Bus& bus);

void post(entt::registry& reg, ecs::Commands commands, ecs::Query query, ecs::Bus& bus);

class ExtensionPlugin : public ecs::Plugin {
 public:
  void build(ecs::App& app) override;
};
}  // namespace qbe::editing::Extension